#!/usr/bin/perl

package wrapMain;

sub import {
    our $code = q{
        sub {
            local($", $!) = (', ', 0);
            print "*** wrapper called";
            return &$sref(@_);
        }
    };
    $code = eval "$code;";
    $sref = \&{'main::func'};
    *{'main::func'} = $code;
}

sub unimport {
    *{'main::func'} = $sref;
}


1;
